//装饰器可以理解为一些函数的封装，使其书写起来非常简洁明了
import { Component,Input,OnInit,Inject } from '@angular/core';
import {LoggerService} from "./services/logger.service";
import {LoginService} from "./services/login.service";
import {OldloggerService} from "./services/oldlogger.service";
import {ValuesService} from "./services/values.service";
import {UserService} from "./services/user.service";



@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.css']
})
export class AppComponent implements OnInit{
  private items:any[];
  private show:boolean;
  constructor(
    private _logger:LoggerService,
    private _login:LoginService,
    private _oldlogger:OldloggerService,
    //@Inject(ValuesService) private _values,
    //private _user:UserService,//注入工厂服务
  ){
    this.items=[{id:1,title:'aa'},{id:2,title:'bb'}]
  }
  ngOnInit(){
    this.show=false;
    this._logger.log(' app log');
    this._logger.getrandom();
    this._oldlogger.log('old app')
    console.log(this._login.getlogin());
    //console.log(this._values.getvalue());
    //this._logger.log(this._user.getuser());
  }
  click(num:number){
    console.log(num)
    this.items.splice(num,1)
  }
}
